
export function asy_gets(url){
    return new Promise((resove, reject) => {
        var head = document.getElementsByTagName('head')[0];
        var script = document.createElement('script');
        script.type = 'text/javascript';
        script.charset = 'GBK';
        script.onload = script.onreadystatechange = function() {
            if (!this.readyState || this.readyState === "loaded" || this.readyState === "complete" ) {
                resove(true)
                script.onload = script.onreadystatechange = null;
            }else{
                reject(false)
            }
        };
        script.src= url;
        head.appendChild(script);
    })
 
}